﻿<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="am-cf am-u-md-12 header-title">
        <h2>[{$model['title']}] 列表</h2>
    </div>
    <div class="am-cf am-u-md-12 am-margin-top">
        <div class="am-cf am-u-md-6">
        <empty name="model.extend">
            <div class="am-btn-group">
                <a class="am-btn am-btn-primary" href="{:U('add?model='.$model['id'])}">新 增</a>
                <button class="am-btn am-btn-danger ajax-post confirm" target-form="ids" url="{:U('del?model='.$model['id'])}">删 除</button>
            </div>
        </empty>
        </div>
        <!-- 高级搜索 -->


 <php>
            if($model['id']==30){
        </php>
<form  method="post" name="form" id="form" action="{:U('Think/search','model='.$model['name'],false)}">
    
                    <div style="width: 100%; height: 45px; float: left; margin-top: 20px; background:#e8e8e8; line-height: 42px; ">
            <div style="width: 80px; float: left; text-align: center;">公司名称 : </div>          
            <div style="width: 120px; float: left;"><input type="text" name="company" id="company" style="width: 120px; height: 35px; border: 0px;"></div>
              <div style="width: 50px; float: left; text-align: center;">类型 : </div>          
            <div style="width: 154px; float: left;"><select name="type" id="type" style="width: 154px; height: 27px; padding:0px;"> 
      <option value="全部" selected="selected" style="padding:0px;">----全部----</option>
      <option value="黑色金属">黑色金属</option>
      <option value="有色炉料">有色炉料</option>
      <option value="汽车">汽车</option>
      <option value="二手车">二手车</option>
      <option value="化工">化工</option>
      <option value="建材">建材</option>
      <option value="木材">木材</option>
      <option value="机电">机电</option>
      <option value="农产品">农产品</option>
      <option value="电子电器">电子电器</option>
      <option value="其他">其他</option>

                              </select></div>
            <div style="width: 50px; float: left; text-align: center;">品名 : </div> 
             <div style="width:70px; float: left;"><input type="text" name="product" id="product" style="width: 70px; height: 35px; border: 0px;"></div>   
              <div style="width: 60px; float: left; text-align: center;">电话 : </div>
              <div style="width: 110px; float: left; text-align: center;"><input type="text" name="tel" id="tel" style="width: 110px; height: 35px; border: 0px;"></div>     
              <div style="width: 90px; float: left; text-align: center;">起始日期 : </div> 
              <div style="width: 90px; float: left; text-align: center;"><input name="addtime" type="text" id="addtime" class="time" placeholder="请选择时间" style="width: 90px; float: left; text-align: center; height: 35px; border: 0px; margin-top: 5px;" ></div>   
                <div style="width: 90px; float: left; text-align: center;" >终止日期 : </div> 
              <div style="width: 90px; float: left; text-align: center;"><input type="text" name="time" id="time" class="time" placeholder="请选择时间"  style="width: 90px; float: left; text-align: center;  height: 35px; border: 0px; margin-top: 5px;"></div>   
              <div style="width: 60px; float: left; margin-left: 10px; display: inline;  "><input type="submit" value="搜索"></div>
            </div> 
            </form>
        <php>}</php>

    </div>


    <!-- 数据列表 -->
    <div class="am-cf am-u-md-12 am-margin-top">
        <table class="am-table am-table-striped">
            <!-- 表头 -->
            <thead>
                <tr style="width: 1020px  !important; height: 42px; overflow: hidden;;">
                    <th class="row-selected row-selected">
                        <input class="check-all" type="checkbox">
                    </th>
                    <volist name="list_grids" id="field">
                        <th>{$field.title}</th>
                    </volist>
                </tr>
            </thead>

            <!-- 列表 -->
            <tbody>
                <volist name="list_data" id="data">
                    <tr>
                        <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
                        <volist name="list_grids" id="grid">
                            <td>{:get_list_field($data,$grid)}</td>
                        </volist>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
    <div class="am-cf am-u-md-12">
        {$_page|default=''}
    </div>
</block>




<block name="script">

<script type="text/javascript" src="__PUBLIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
    $('.time').datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        language:"zh-CN",
        minView:2,
        autoclose:true
    });
    $('.date').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
        minView:2,
        autoclose:true
    });
    showTab();
});
</script>
</block>
